package helexis.game.tyrian.domain;

import java.util.Locale;

import helexis.game.tyrian.utils.TextUtils;

/**
 * 게임 캐릭터 - 우주선 - 의 모델
 * 
 * @author 조만희
 *
 */
public enum ShipModel implements Item {
	
    USP_TALON("USP Talon", 6000, 1),
    GENCORE_PHOENIX("Gencore Phoenix", 12000, 2),
    GENCORE_II("Gencore II", 17000, 3),
    MICROSOL_STALKER("Microsol Stalker", 20000, 4),
    SUPER_CARROT("Super Carrot", 50000, 5);
    
    /**
     * 우주선 이름
     */
    private final String name;
    /**
     * 우주선 가격
     */
    private final int price;
    /**
     * 우주선 화력
     */
    private final int firingCapacity;
    
    
    private ShipModel (String name, int price, int firingCapacity) {
    	this.name = name;
    	this.price = price;
    	this.firingCapacity = firingCapacity;
    }//end of constructor
    
    
	public String getName() {
		return this.name;
	}//end of getName()
	
	
	@Override
	public int getPrice() {
		return this.price;
	}//end of getPrice()
	
	
	@Override
	public String getPriceAsText() {
		return TextUtils.creditStyle(this.price);
	}//end of getPriceAsText()
    
	
	
	/**
	 * 이 우주선의 화력 레벨을 리턴합니다. (1~5)
	 * 
	 * 1은 1/4 초 마다 한 발씩 쏘는 것을 의미합니다.
	 * 
	 * @return 화력
	 */
	public int getFiringCapacity() {
		return this.firingCapacity;
	}//end of getFiringCapacity()
	
	
	
	@Override
	public String toString() {
		return String.format(Locale.KOREA, "%s (%s) - FiringCapacity: %d", this.name, this.getPriceAsText(), this.firingCapacity);
	}//end of toString()

}
//end of ShipModel.java